// component/twoBar/twoBar.js
Component({
  properties: {
    navBar: {
      type: Array,
      value: []
    }
  },
  data: {
    currentIndex: 0
  },
  methods: {
   getIitemIndex(e) {
      // console.log(e)
      const itemIdx = e.currentTarget.dataset.index
      this.setData({ currentIndex:itemIdx })
      this.triggerEvent("itemIdx", itemIdx)
    },
    setCurrentIndex(index){
      this.setData({currentIndex:index})
    }
  }
})
